{include file='header'/}
<title>添加内容</title>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <form class="layui-form layuimini-form" action="javascript:" onsubmit="return dosub(this)" onkeydown="if(event.keyCode==13){return false;}" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label required">标题</label>
                <div class="layui-input-block">
                    <label for="title">
                        <input type="text" id="title" name="title" value="" lay-verify="required" autocomplete="off"
                               class="layui-input" lay-reqtext="标题不能为空">
                    </label>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">办理时间</label>
                <div class="layui-input-block">
                    <label for="time_str">
                        <input type="text" id="time_str" name="time_str" value="" autocomplete="off" class="layui-input">
                    </label>
                    <tip>如：02月04日 15:00 - 02月15日 16:30</tip>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label required">办理对象</label>
                    <div class="layui-input-inline">
                        <label for="type">
                            <select name="type" lay-verify="required" lay-reqtext="请选择">
                                <option value="1">个人服务</option>
                                <option value="2">企业服务</option>
                            </select>
                        </label>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">到达现场次数</label>
                    <div class="layui-input-inline">
                        <label for="arrive_nums">
                            <input type="number" id="arrive_nums" name="arrive_nums" value="0" autocomplete="off" class="layui-input">
                        </label>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">法定办结时限</label>
                    <div class="layui-input-inline">
                        <label for="finish_days">
                            <input type="number" id="finish_days" name="finish_days" value="0" autocomplete="off" class="layui-input">
                        </label>
                    </div>
                </div>

                <div class="layui-inline">
                    <label class="layui-form-label">承诺办结时限</label>
                    <div class="layui-input-inline">
                        <label for="commitment_days">
                            <input type="number" id="commitment_days" name="commitment_days" value="0" autocomplete="off" class="layui-input">
                        </label>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">办理形式</label>
                <div class="layui-input-block">
                    <label for="appli_type">
                        <input type="text" id="appli_type" name="appli_type" value="" autocomplete="off" class="layui-input">
                    </label>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">日常用语</label>
                <div class="layui-input-block">
                    <label for="daily_lang">
                        <input type="text" id="daily_lang" name="daily_lang" value="" autocomplete="off" class="layui-input">
                    </label>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">实施主体</label>
                <div class="layui-input-block">
                    <label for="entity">
                        <input type="text" id="entity" name="entity" value="" autocomplete="off" class="layui-input">
                    </label>
                </div>
            </div>
            
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">受理条件</label>
                <div class="layui-input-block">
                    <textarea name="conditions_text" placeholder="请输入内容" class="layui-textarea"></textarea>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">办理流程</label>
                <div class="layui-input-block" id="contentEditorHtml" style="z-index: 0">
                    {php}echo lib\Form::editor('flow_content',$val='', 'width:100%;height:400px');{/php}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">权重</label>
                <div class="layui-input-block">
                    <label for="sorts">
                        <input type="text" id="sorts" name="sorts" value="" autocomplete="off" class="layui-input" lay-reqtext="排序">
                    </label>
                    <tip>越小排序越靠前</tip>
                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-block">
                    <input type="hidden" name="status" value="1">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-sm" onclick="set_status(1)">立即提交
                    </button>
                    <button class="layui-btn layui-btn-normal layui-btn-sm" onclick="set_status(0)"> 保存草稿
                    </button>
                    <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
{include file='footer'/}
<script>
  layui.use(['form', 'jquery'], function () {
    let form = layui.form, $ = layui.jquery;
    form.render();
    window.dosub = function (obj) {
      HuiDoSub($(obj).serialize(), "{:__url('content.Guide/add')}");
    }
  })
  ;
</script>

</body>
</html>
